//#define _CRT_SECURE_NO_WARNINGS 1
//#include<stdio.h>
//int main()
//{
//	int year, month;
//	while(scanf("%d%d", &year, &month)!=EOF)
//	{
//		int arr1[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
//		if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
//			arr1[1] = 29;
//		printf("%d", arr1[month - 1]);
//	}
//	return 0;
//}